package yhao.infra.common.threads;

/**
 * 线程池信息
 * @Author zhao bin
 **/
public class ThreadPoolInfo {

    // 核心线程数
    private int corePoolSize;

    // 最大线程数
    private int maxPoolSize;

    // 池中当前线程数
    private int poolSize;

    // 正在执行任务的线程数
    private int activeCount;

    // 队列剩余容量
    private int remainingCapacity;

    // 线程名称前缀
    private String threadNamePrefix;

    // 已完成的任务数量
    private long completedTaskCount;

    // 未完成的任务数量
    private int uncompletedTaskCount;

    public int getCorePoolSize() {
        return corePoolSize;
    }

    public ThreadPoolInfo setCorePoolSize(int corePoolSize) {
        this.corePoolSize = corePoolSize;
        return this;
    }

    public int getMaxPoolSize() {
        return maxPoolSize;
    }

    public ThreadPoolInfo setMaxPoolSize(int maxPoolSize) {
        this.maxPoolSize = maxPoolSize;
        return this;
    }

    public int getPoolSize() {
        return poolSize;
    }

    public ThreadPoolInfo setPoolSize(int poolSize) {
        this.poolSize = poolSize;
        return this;
    }

    public int getActiveCount() {
        return activeCount;
    }

    public ThreadPoolInfo setActiveCount(int activeCount) {
        this.activeCount = activeCount;
        return this;
    }

    public int getRemainingCapacity() {
        return remainingCapacity;
    }

    public ThreadPoolInfo setRemainingCapacity(int remainingCapacity) {
        this.remainingCapacity = remainingCapacity;
        return this;
    }

    public String getThreadNamePrefix() {
        return threadNamePrefix;
    }

    public ThreadPoolInfo setThreadNamePrefix(String threadNamePrefix) {
        this.threadNamePrefix = threadNamePrefix;
        return this;
    }

    public long getCompletedTaskCount() {
        return completedTaskCount;
    }

    public ThreadPoolInfo setCompletedTaskCount(long completedTaskCount) {
        this.completedTaskCount = completedTaskCount;
        return this;
    }

    public int getUncompletedTaskCount() {
        return uncompletedTaskCount;
    }

    public ThreadPoolInfo setUncompletedTaskCount(int uncompletedTaskCount) {
        this.uncompletedTaskCount = uncompletedTaskCount;
        return this;
    }
}
